package xin.marcher.module.lifecycle.converter;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.mapstruct.Mapper;
import xin.marcher.module.common.core.PageResult;
import xin.marcher.module.lifecycle.domain.dto.ProductExpriConfigurationDTO;
import xin.marcher.module.lifecycle.domain.entity.ProductExpriConfigurationDO;
import xin.marcher.module.lifecycle.domain.request.ProductExpriConfigurationRequest;

import java.util.List;

/**
 *
 */
@Mapper(componentModel = "spring")
public interface ProductExpriConfigurationConverter {
    /**
     * 转换分页查询考核配置信息DO --> DTO
     *
     * @param issuesResultDO
     * @return
     */
    PageResult<ProductExpriConfigurationDTO> converterPageResult(Page<ProductExpriConfigurationDO> issuesResultDO);

    /**
     * 考核配置信息request --> DO
     *
     * @param request
     * @return
     */
    ProductExpriConfigurationDO requestToEntity(ProductExpriConfigurationRequest request);

    /**
     * 考核配置信息DO --> DTO
     *
     * @param records
     * @return
     */
    List<ProductExpriConfigurationDTO> listEntityToDTO(List<ProductExpriConfigurationDO> records);

    /**
     * 考核配置信息DO --> DTO
     *
     * @param selectOne
     * @return
     */
    ProductExpriConfigurationDTO entityToDTO(ProductExpriConfigurationDO selectOne);
}
